﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace PiaoanWeb
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void loginBtn_Click(object sender, EventArgs e)
        {
            if (nameTxtBox.Text.Equals("Admin") && passwordTxtBox.Text.Equals("1q2w3e4r"))
            {
                FormsAuthentication.SetAuthCookie("Admin", false);
                Response.Redirect("Admin/Block.aspx?T=关于飘安");
            }
            else
            {
                msgLbl.Text = "登录失败，请确认用户名和密码输入正确。";
            }
        }
    }
}